package com.kbbywyclient.util.customservice;

import com.kbbywyclient.app.Constants;

/**
 * Created by FHW
 * on 2017/3/24
 */

public class ApiException extends RuntimeException {
    private int mErrorCode;

    public ApiException(int errorCode, String errorMessage) {
        super(errorMessage);
        mErrorCode = errorCode;
    }

    /**
     * @return 成功返回true, 否则返回false;
     */
    public boolean isSuccessExpried() {
        return mErrorCode == Constants.CODE_SUCCESS;
    }
}
